Split classic-1 test entries up a bit
authorrobertlipe <robertlipe@gmail.com>
Sun, 10 Feb 2013 03:00:40 +0000 (03:00 +0000)
committerrobertlipe <robertlipe@gmail.com>
Sun, 10 Feb 2013 03:00:40 +0000 (03:00 +0000)
gpsbabel/testo.d/classic-1.test
gpsbabel/testo.d/geo.test [new file with mode: 0644]
gpsbabel/testo.d/gpsman.test [new file with mode: 0644]
gpsbabel/testo.d/gpsutil.test [new file with mode: 0644]
gpsbabel/testo.d/gpx.test [new file with mode: 0644]
gpsbabel/testo.d/gtm.test [new file with mode: 0644]
gpsbabel/testo.d/magellan.test [new file with mode: 0644]
gpsbabel/testo.d/magnav.test [new file with mode: 0644]
gpsbabel/testo.d/mapsend.test [new file with mode: 0644]
gpsbabel/testo.d/pcx.test [new file with mode: 0644]
gpsbabel/testo.d/tiger.test [new file with mode: 0644]

index 52c455bcf1ed025a31639511baae0ad37b421bb9..8bfc755503958dc4cc885ee42386a5d4d909335a 100644 (file)
@@ -1,68 +1,9 @@
 #!/bin/sh
 
-# Geocaching .loc
-rm -f ${TMPDIR}/gl.loc
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o geo -F ${TMPDIR}/gl.loc
-compare ${TMPDIR}/gl.loc ${REFERENCE}
-
-# GPSUtil
-rm -f ${TMPDIR}/gu.wpt ${TMPDIR}/1.gpx ${TMPDIR}/2.gpx
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpsutil -F ${TMPDIR}/gu.wpt
-compare ${TMPDIR}/gu.wpt ${REFERENCE}
-gpsbabel -i gpsutil -f ${TMPDIR}/gu.wpt -o gpx -F ${TMPDIR}/1.gpx
-gpsbabel -i gpsutil -f ${REFERENCE}/gu.wpt -o gpx -F ${TMPDIR}/2.gpx
-compare ${TMPDIR}/1.gpx ${TMPDIR}/2.gpx
-
-# GPSman 
-rm -f ${TMPDIR}/gm.gm ${TMPDIR}/gm.gm+
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpsman -F ${TMPDIR}/gm.gm
-gpsbabel -i gpsman -f ${TMPDIR}/gm.gm -o gpsutil -F ${TMPDIR}/gm.gm+
-compare ${TMPDIR}/gm.gm+ ${TMPDIR}/gu.wpt
-
-# GPX
-rm -f ${TMPDIR}/gl.gpx ${TMPDIR}/gpx.gpx
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpx -F ${TMPDIR}/gl.gpx
-gpsbabel -i gpx -f ${TMPDIR}/gl.gpx -o gpsutil -F ${TMPDIR}/gpx.gpx
-compare ${TMPDIR}/gpx.gpx ${TMPDIR}/gu.wpt
-
-# GTM
-rm -f ${TMPDIR}/gl.gpx ${TMPDIR}/gpx.gpx
-gpsbabel -i gtm -f ${REFERENCE}/sample.gtm -o gpx -F ${TMPDIR}/gtm1.gpx
-gpsbabel -i gpx -f ${TMPDIR}/gtm1.gpx -o gtm -F ${TMPDIR}/gtm.gtm
-gpsbabel -i gtm -f ${TMPDIR}/gtm.gtm -o gpx -F ${TMPDIR}/gtm2.gpx
-compare ${TMPDIR}/gtm1.gpx ${TMPDIR}/gtm2.gpx
-bincompare ${TMPDIR}/gtm.gtm ${REFERENCE}/sample.gtm
-#
-# GTM compressed files
-# ... do the same as above but with gzipped gtm files
-#
-rm -f ${TMPDIR}/gl.gpx ${TMPDIR}/gpx.gpx
-gpsbabel -i gtm -f ${REFERENCE}/sample.gtm.gz -o gpx -F ${TMPDIR}/gtm1.gpx
-gpsbabel -i gpx -f ${TMPDIR}/gtm1.gpx -o gtm -F ${TMPDIR}/gtm.gtm.gz
-gpsbabel -i gtm -f ${TMPDIR}/gtm.gtm.gz -o gpx -F ${TMPDIR}/gtm2.gpx
-compare ${TMPDIR}/gtm1.gpx ${TMPDIR}/gtm2.gpx
-bincompare ${TMPDIR}/gtm.gtm.gz ${REFERENCE}/sample.gtm.gz
-gunzip -c ${TMPDIR}/gtm.gtm.gz > ${TMPDIR}/gtm.gtm
-gunzip -c ${REFERENCE}/sample.gtm.gz > ${TMPDIR}/sample.gtm
-bincompare ${TMPDIR}/gtm.gtm ${REFERENCE}/sample.gtm
-
-# Magellan Mapsend
-rm -f ${TMPDIR}/mm.mapsend ${TMPDIR}/mm.gps
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o mapsend -F ${TMPDIR}/mm.mapsend
-gpsbabel -i mapsend -f ${TMPDIR}/mm.mapsend -o gpsutil -F ${TMPDIR}/mm.gps
-compare ${TMPDIR}/mm.gps ${TMPDIR}/gu.wpt
 
 # Magellan serial
 # TODO
 
-# Tiger
-# This one is a little tacky, becuase it's a very lossy format.
-# so we simply test we can write it, and then read it and write it and
-# get an identical file back.
-rm -f ${TMPDIR}/tiger
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o tiger -F ${TMPDIR}/tiger
-gpsbabel -i tiger -f ${TMPDIR}/tiger -o tiger -F ${TMPDIR}/tiger2
-compare ${TMPDIR}/tiger ${TMPDIR}/tiger2
 
 #
 # Lowrance USR.  Binary, and also slightly lossy because of the math to
@@ -118,37 +59,6 @@ gpsbabel -i xmap -f ${TMPDIR}/xmap -o gpx -F ${TMPDIR}/xmap-2.gpx
 compare ${TMPDIR}/xmap-1.gpx ${TMPDIR}/xmap-2.gpx
 compare ${REFERENCE}/xmap ${TMPDIR}/xmap
 
-# PCX (Garmin mapsource import) file format
-rm -f ${TMPDIR}/mm.pcx ${TMPDIR}/pcx.gps
-gpsbabel -i gpx -f ${REFERENCE}/geocaching.gpx -o pcx -F ${TMPDIR}/mm.pcx
-gpsbabel -i pcx -f ${TMPDIR}/mm.pcx -o gpsutil -F ${TMPDIR}/pcx.gps
-compare ${TMPDIR}/mm.gps ${TMPDIR}/gu.wpt
-gpsbabel -t -i gpx -f ${REFERENCE}/track/tracks.gpx -o pcx -F ${TMPDIR}/pcx.trk
-gpsbabel -t -i pcx -f ${REFERENCE}/track/pcx.trk -o pcx -F ${TMPDIR}/pcx2.trk
-compare ${TMPDIR}/pcx.trk ${TMPDIR}/pcx2.trk 
-# GPSUtil strain - hand crafted, but based on problem report.
-gpsbabel -i pcx -f ${REFERENCE}/gpsutil-1.pcx -o pcx -F ${TMPDIR}/mm-2.pcx
-compare ${TMPDIR}/mm-2.pcx ${TMPDIR}/mm.pcx
-
-#
-# Magellan file format
-#
-gpsbabel -i magellan -f ${REFERENCE}/magfile -o magellan -F ${TMPDIR}/magfile
-compare ${TMPDIR}/magfile ${REFERENCE}/magfile
-
-#
-# Magellanx is just like, but with longer names. (which this admittedly
-# doesn't actually exercise...)
-#
-gpsbabel -i magellan -f ${REFERENCE}/magfile -o magellanx -F ${TMPDIR}/magfile2
-compare ${TMPDIR}/magfile2 ${REFERENCE}/magfile
-
-# Magellanx routes, however, have an extra 'name' field in them.
-gpsbabel -r -i magellanx -f ${REFERENCE}/route/magexplorist.rte -o magellanx -F ${TMPDIR}/magxfile.rte
-gpsbabel -r -i magellanx -f ${TMPDIR}/magxfile.rte -o magellanx -F ${TMPDIR}/magxfile2.rte
-compare ${TMPDIR}/magxfile2.rte ${REFERENCE}/route/magexplorist.rte
-
-
 # Navitrak DNA marker format
 gpsbabel -i dna -f ${REFERENCE}/dnatest.txt -o dna -F ${TMPDIR}/dnatest.txt
 compare ${TMPDIR}/dnatest.txt ${REFERENCE}/dnatest.txt
@@ -202,27 +112,6 @@ compare ${TMPDIR}/ozi.wpt ${REFERENCE}
 gpsbabel -i holux -f ${REFERENCE}/paris.wpo -o holux -F ${TMPDIR}/paris.wpo
 # compare ${REFERENCE}/paris.wpo ${TMPDIR}/paris.wpo
 
-# Magellan NAV Companion for PalmOS
-# This format is hard to test, because each record and the database itself
-# contains the time of creation, so two otherwise identical files won't
-# compare accurately.  In any case, the files are binary so compare wouldn't
-# like them.  So, we convert the reference file to gpsutil and the converted
-# file to gpsutil and make sure they're the same, and that they're the same
-# as one converted on a known-working installation.  Unfortunately, this does
-# not verify that the appinfo block was written correctly.  However, it does
-# successfully test for some endianness errors that might otherwise go 
-# unnoticed.
-rm -f ${TMPDIR}/magnav.pdb ${TMPDIR}/magnav.gpu ${TMPDIR}/magnavt.gpu
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o magnav -F ${TMPDIR}/magnav.pdb
-gpsbabel -i magnav -f ${TMPDIR}/magnav.pdb -o gpsutil -F ${TMPDIR}/magnav.gpu
-gpsbabel -i magnav -f ${REFERENCE}/magnav.pdb -o gpsutil -F ${TMPDIR}/magnavt.gpu
-compare ${TMPDIR}/magnavt.gpu ${TMPDIR}/magnav.gpu
-compare ${REFERENCE}/gu.wpt ${TMPDIR}/magnav.gpu
-
-rm -f ${TMPDIR}/magnav.pdb
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o magnav -F ${TMPDIR}/magnav.pdb
-bincompare ${TMPDIR}/magnav.pdb ${REFERENCE}/magnav.pdb
-
 
 
 # GPSPilot Tracker for PalmOS
diff --git a/gpsbabel/testo.d/geo.test b/gpsbabel/testo.d/geo.test
new file mode 100644 (file)
index 0000000..d5752a6
--- /dev/null
@@ -0,0 +1,5 @@
+
+# Geocaching .loc
+rm -f ${TMPDIR}/gl.loc
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o geo -F ${TMPDIR}/gl.loc
+compare ${TMPDIR}/gl.loc ${REFERENCE}
diff --git a/gpsbabel/testo.d/gpsman.test b/gpsbabel/testo.d/gpsman.test
new file mode 100644 (file)
index 0000000..9810920
--- /dev/null
@@ -0,0 +1,6 @@
+
+# GPSman 
+rm -f ${TMPDIR}/gm.gm ${TMPDIR}/gm.gm+
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpsman -F ${TMPDIR}/gm.gm -o gpsutil -F ${TMPDIR}/gu.wpt
+gpsbabel -i gpsman -f ${TMPDIR}/gm.gm -o gpsutil -F ${TMPDIR}/gm.gm+
+compare ${TMPDIR}/gm.gm+ ${TMPDIR}/gu.wpt
diff --git a/gpsbabel/testo.d/gpsutil.test b/gpsbabel/testo.d/gpsutil.test
new file mode 100644 (file)
index 0000000..29f92ba
--- /dev/null
@@ -0,0 +1,7 @@
+# GPSUtil
+rm -f ${TMPDIR}/gu.wpt ${TMPDIR}/1.gpx ${TMPDIR}/2.gpx
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpsutil -F ${TMPDIR}/gu.wpt
+compare ${TMPDIR}/gu.wpt ${REFERENCE}
+gpsbabel -i gpsutil -f ${TMPDIR}/gu.wpt -o gpx -F ${TMPDIR}/1.gpx
+gpsbabel -i gpsutil -f ${REFERENCE}/gu.wpt -o gpx -F ${TMPDIR}/2.gpx
+compare ${TMPDIR}/1.gpx ${TMPDIR}/2.gpx
diff --git a/gpsbabel/testo.d/gpx.test b/gpsbabel/testo.d/gpx.test
new file mode 100644 (file)
index 0000000..eb33742
--- /dev/null
@@ -0,0 +1,6 @@
+
+# GPX
+rm -f ${TMPDIR}/gl.gpx ${TMPDIR}/gpx.gpx
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpx -F ${TMPDIR}/gl.gpx
+gpsbabel -i gpx -f ${TMPDIR}/gl.gpx -o gpsutil -F ${TMPDIR}/gpx.gpx
+compare ${TMPDIR}/gpx.gpx ${TMPDIR}/gu.wpt
diff --git a/gpsbabel/testo.d/gtm.test b/gpsbabel/testo.d/gtm.test
new file mode 100644 (file)
index 0000000..b855008
--- /dev/null
@@ -0,0 +1,22 @@
+
+# GTM
+rm -f ${TMPDIR}/gl.gpx ${TMPDIR}/gpx.gpx
+gpsbabel -i gtm -f ${REFERENCE}/sample.gtm -o gpx -F ${TMPDIR}/gtm1.gpx
+gpsbabel -i gpx -f ${TMPDIR}/gtm1.gpx -o gtm -F ${TMPDIR}/gtm.gtm
+gpsbabel -i gtm -f ${TMPDIR}/gtm.gtm -o gpx -F ${TMPDIR}/gtm2.gpx
+compare ${TMPDIR}/gtm1.gpx ${TMPDIR}/gtm2.gpx
+bincompare ${TMPDIR}/gtm.gtm ${REFERENCE}/sample.gtm
+#
+# GTM compressed files
+# ... do the same as above but with gzipped gtm files
+#
+rm -f ${TMPDIR}/gl.gpx ${TMPDIR}/gpx.gpx
+gpsbabel -i gtm -f ${REFERENCE}/sample.gtm.gz -o gpx -F ${TMPDIR}/gtm1.gpx
+gpsbabel -i gpx -f ${TMPDIR}/gtm1.gpx -o gtm -F ${TMPDIR}/gtm.gtm.gz
+gpsbabel -i gtm -f ${TMPDIR}/gtm.gtm.gz -o gpx -F ${TMPDIR}/gtm2.gpx
+compare ${TMPDIR}/gtm1.gpx ${TMPDIR}/gtm2.gpx
+bincompare ${TMPDIR}/gtm.gtm.gz ${REFERENCE}/sample.gtm.gz
+gunzip -c ${TMPDIR}/gtm.gtm.gz > ${TMPDIR}/gtm.gtm
+gunzip -c ${REFERENCE}/sample.gtm.gz > ${TMPDIR}/sample.gtm
+bincompare ${TMPDIR}/gtm.gtm ${REFERENCE}/sample.gtm
+
diff --git a/gpsbabel/testo.d/magellan.test b/gpsbabel/testo.d/magellan.test
new file mode 100644 (file)
index 0000000..5e03ef1
--- /dev/null
@@ -0,0 +1,20 @@
+
+
+#
+# Magellan file format
+#
+gpsbabel -i magellan -f ${REFERENCE}/magfile -o magellan -F ${TMPDIR}/magfile
+compare ${TMPDIR}/magfile ${REFERENCE}/magfile
+
+#
+# Magellanx is just like, but with longer names. (which this admittedly
+# doesn't actually exercise...)
+#
+gpsbabel -i magellan -f ${REFERENCE}/magfile -o magellanx -F ${TMPDIR}/magfile2
+compare ${TMPDIR}/magfile2 ${REFERENCE}/magfile
+
+# Magellanx routes, however, have an extra 'name' field in them.
+gpsbabel -r -i magellanx -f ${REFERENCE}/route/magexplorist.rte -o magellanx -F ${TMPDIR}/magxfile.rte
+gpsbabel -r -i magellanx -f ${TMPDIR}/magxfile.rte -o magellanx -F ${TMPDIR}/magxfile2.rte
+compare ${TMPDIR}/magxfile2.rte ${REFERENCE}/route/magexplorist.rte
+
diff --git a/gpsbabel/testo.d/magnav.test b/gpsbabel/testo.d/magnav.test
new file mode 100644 (file)
index 0000000..93423bc
--- /dev/null
@@ -0,0 +1,21 @@
+# Magellan NAV Companion for PalmOS
+# This format is hard to test, because each record and the database itself
+# contains the time of creation, so two otherwise identical files won't
+# compare accurately.  In any case, the files are binary so compare wouldn't
+# like them.  So, we convert the reference file to gpsutil and the converted
+# file to gpsutil and make sure they're the same, and that they're the same
+# as one converted on a known-working installation.  Unfortunately, this does
+# not verify that the appinfo block was written correctly.  However, it does
+# successfully test for some endianness errors that might otherwise go 
+# unnoticed.
+rm -f ${TMPDIR}/magnav.pdb ${TMPDIR}/magnav.gpu ${TMPDIR}/magnavt.gpu
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o magnav -F ${TMPDIR}/magnav.pdb
+gpsbabel -i magnav -f ${TMPDIR}/magnav.pdb -o gpsutil -F ${TMPDIR}/magnav.gpu
+gpsbabel -i magnav -f ${REFERENCE}/magnav.pdb -o gpsutil -F ${TMPDIR}/magnavt.gpu
+compare ${TMPDIR}/magnavt.gpu ${TMPDIR}/magnav.gpu
+compare ${REFERENCE}/gu.wpt ${TMPDIR}/magnav.gpu
+
+rm -f ${TMPDIR}/magnav.pdb
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o magnav -F ${TMPDIR}/magnav.pdb
+bincompare ${TMPDIR}/magnav.pdb ${REFERENCE}/magnav.pdb
+
diff --git a/gpsbabel/testo.d/mapsend.test b/gpsbabel/testo.d/mapsend.test
new file mode 100644 (file)
index 0000000..35ca500
--- /dev/null
@@ -0,0 +1,5 @@
+# Magellan Mapsend
+rm -f ${TMPDIR}/mm.mapsend ${TMPDIR}/mm.gps
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o mapsend -F ${TMPDIR}/mm.mapsend
+gpsbabel -i mapsend -f ${TMPDIR}/mm.mapsend -o gpsutil -F ${TMPDIR}/mm.gps
+compare ${TMPDIR}/mm.gps ${TMPDIR}/gu.wpt
diff --git a/gpsbabel/testo.d/pcx.test b/gpsbabel/testo.d/pcx.test
new file mode 100644 (file)
index 0000000..2b75dd4
--- /dev/null
@@ -0,0 +1,11 @@
+# PCX (Garmin mapsource import) file format
+rm -f ${TMPDIR}/mm.pcx ${TMPDIR}/pcx.gps
+gpsbabel -i gpx -f ${REFERENCE}/geocaching.gpx -o pcx -F ${TMPDIR}/mm.pcx
+gpsbabel -i pcx -f ${TMPDIR}/mm.pcx -o gpsutil -F ${TMPDIR}/pcx.gps
+compare ${TMPDIR}/mm.gps ${TMPDIR}/gu.wpt
+gpsbabel -t -i gpx -f ${REFERENCE}/track/tracks.gpx -o pcx -F ${TMPDIR}/pcx.trk
+gpsbabel -t -i pcx -f ${REFERENCE}/track/pcx.trk -o pcx -F ${TMPDIR}/pcx2.trk
+compare ${TMPDIR}/pcx.trk ${TMPDIR}/pcx2.trk 
+# GPSUtil strain - hand crafted, but based on problem report.
+gpsbabel -i pcx -f ${REFERENCE}/gpsutil-1.pcx -o pcx -F ${TMPDIR}/mm-2.pcx
+compare ${TMPDIR}/mm-2.pcx ${TMPDIR}/mm.pcx
diff --git a/gpsbabel/testo.d/tiger.test b/gpsbabel/testo.d/tiger.test
new file mode 100644 (file)
index 0000000..5cfd675
--- /dev/null
@@ -0,0 +1,8 @@
+# Tiger
+# This one is a little tacky, becuase it's a very lossy format.
+# so we simply test we can write it, and then read it and write it and
+# get an identical file back.
+rm -f ${TMPDIR}/tiger
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o tiger -F ${TMPDIR}/tiger
+gpsbabel -i tiger -f ${TMPDIR}/tiger -o tiger -F ${TMPDIR}/tiger2
+compare ${TMPDIR}/tiger ${TMPDIR}/tiger2